using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Features
{
    /// <summary>
    /// <para>Points To Line</para>
    /// <para>Creates line features from points.</para>
    /// <para>从点创建线要素。</para>
    /// </summary>    
    [DisplayName("Points To Line")]
    public class PointsToLine : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public PointsToLine()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Features">
        /// <para>Input Features</para>
        /// <para>The point features to be converted into lines.</para>
        /// <para>要转换为线的点要素。</para>
        /// </param>
        /// <param name="_Output_Feature_Class">
        /// <para>Output Feature Class</para>
        /// <para>The line feature class which will be created from the input points.</para>
        /// <para>将从输入点创建的线要素类。</para>
        /// </param>
        public PointsToLine(object _Input_Features, object _Output_Feature_Class)
        {
            this._Input_Features = _Input_Features;
            this._Output_Feature_Class = _Output_Feature_Class;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Points To Line";

        public override string CallName => "management.PointsToLine";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "configKeyword", "outputMFlag", "outputZFlag", "outputZValue", "qualifiedFieldNames", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_Input_Features, _Output_Feature_Class, _Line_Field, _Sort_Field, _Close_Line.GetGPValue()];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The point features to be converted into lines.</para>
        /// <para>要转换为线的点要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The line feature class which will be created from the input points.</para>
        /// <para>将从输入点创建的线要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Output_Feature_Class { get; set; }


        /// <summary>
        /// <para>Line Field</para>
        /// <para>Each feature in the output will be based on unique values in the Line Field.</para>
        /// <para>输出中的每个要素都将基于“线字段”中的唯一值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Line Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Line_Field { get; set; } = null;


        /// <summary>
        /// <para>Sort Field</para>
        /// <para>By default, points used to create each output line feature will be used in the order they are found. If a different order is desired, specify a Sort Field.</para>
        /// <para>默认情况下，用于创建每个输出线要素的点将按其找到的顺序使用。如果需要不同的顺序，请指定“排序字段”。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sort Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Sort_Field { get; set; } = null;


        /// <summary>
        /// <para>Close Line</para>
        /// <para><xdoc>
        ///   <para>Specifies whether output line features should be closed.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—An extra vertex will be added to ensure that every output line feature's end point will match up with its start point. Then polygons can be generated from the line feature class using the Feature To Polygon tool.</bullet_item><para/>
        ///     <bullet_item>Unchecked—No extra vertices will be added to close an output line feature. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否应关闭输出线要素。</para>
        ///   <bulletList>
        ///     <bullet_item>选中—将添加一个额外的折点，以确保每个输出线要素的终点与其起点匹配。然后，可以使用要素转面工具从线要素类生成面。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会添加额外的折点以关闭输出线要素。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Close Line")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Close_Line_value _Close_Line { get; set; } = _Close_Line_value._false;

        public enum _Close_Line_value
        {
            /// <summary>
            /// <para>CLOSE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CLOSE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_CLOSE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_CLOSE")]
            [GPEnumValue("false")]
            _false,

        }

        public PointsToLine SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object configKeyword = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, bool? qualifiedFieldNames = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, configKeyword: configKeyword, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, qualifiedFieldNames: qualifiedFieldNames, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}